package com.abaaba.project2.util;

import com.abaaba.project2.bean.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class UserIdUtil {

    public static Subject subject;

    public static Integer getUserId()
    {
        subject = SecurityUtils.getSubject();

        User user = (User) subject.getPrincipal();

        return user.getId();
    }
}
